home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15626 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.minn.net!news
  2. From: gruch@minn.net
  3. Newsgroups: alt.msdos.programmer,comp.lang.c
  4. Subject: Re: DOS doesn't expands wildcard argument...!
  5. Date: Sat, 20 Apr 1996 13:13:17 GMT
  6. Organization: Minn Net
  7. Message-ID: <4lansl$1vk@cobra.Minn.Net>
  8. References: <3177b1d9.14121359@news.hk.linkage.net>
  9. NNTP-Posting-Host: dialup-198.minn.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. budlo@bud.com (Bud Lo) wrote:
  13.  
  14. >hello...
  15.  
  16. >i've written a C program and compiled both a Unix and DOS version,
  17. >the Unix version correctly expands its wildcard argument  like *.jpg 
  18. >into its constituent files while the DOS version do nothing...
  19. >Can anyone suggest solution to make it work in DOS...
  20.  
  21. >(i know that the Unix's shell do the work of wildcard expansion
  22. >before passing them to my program, and observing this behaviors 
  23. >in DOS, does it imply that command.com simply leave this task to 
  24. >programmer???)
  25.  
  26. >thanks a lot..
  27.  
  28. >Herman
  29.  
  30. Yes and no Herman.  COMMAND does not automatically expand wildcards
  31. before passing them to your program.  But DOS does have two services
  32. you can to accomplish this task.  They can be accessed through Int 21
  33. functions 4Eh and 4Fh.  Look in your compiler documentation first
  34. though- It probably contains a function like 
  35. _dos_findfirst and _dos_findnext to make the job a little easier.  If
  36. not you can find the information you need in "The new Peter Norton
  37. Programmers Guide to the IBM PC & PS/2"  ISBN 1-55615-131-4.  Enjoy!
  38.  
  39. ~Gerry
  40.  
  41.